package com.chenyi.algorithm.recursion;

/**
 * @author by chenyi
 * @className RecursionTest
 * @date 2022/1/17 21:49
 */

public class RecursionTest {
    public static void main(String[] args) {
        EightQueens.check(0);
        System.out.printf("一共有：%d种解法\n", EightQueens.count);
        System.out.printf("judge一共判断了：%d次\n", EightQueens.judgeCount);

        MazeBacktracking.mazeBacktracking();
    }

    public static void printRecursion(int num) {
        if (num > 2) {
            printRecursion(num - 1);
        }
        System.out.println("n=" + num);
    }

    public static int factorialRecursion(int num) {
        if (num == 1) {
            return 1;
        }
        return num * factorialRecursion(num - 1);
    }




}
